#include <QtPlugin>
#include <QWidget>
#include <QVBoxLayout>
#include <QPushButton>
#include <QLabel>
#include <QMessageBox>
#include <QCheckBox>
#include <QDoubleSpinBox>

#include <opencv/cv.h>
#include <opencv/highgui.h>

#include "QCVModuleInterface.h"
#include "QCVModuleHandlerInterface.h"
#include "CVMatchingAlgos.h"

#ifndef MODULE_SIFT_ANALYSER
#define MODULE_SIFT_ANALYSER


/**
@class ModuleDescriptorMatcher
@brief Module de mise en correspondances de descripteurs
*/

class ModuleDescriptorMatcher:public QObject,QCVModuleInterface
{
  Q_OBJECT
	Q_INTERFACES(QCVModuleInterface)
	
	public:
		void init(QCVModuleHandlerInterface * parent);
		void free();

		cv::Mat & process();
		void setInput(int n,const cv::Mat & m);

		QWidget* widget();
		QString getName();
		int nbInputs();
		QString help(int id);

		QString getParams();
		bool setParams(QString params);

		QCVModuleInterface * clone();

  public slots:
    void s_capture();
     
  private:
		QCheckBox * auto_capture;
    QLabel * view;
    QDoubleSpinBox * threshold;
    cv::Mat capturedFrame,frame;
    cv::Mat_<float> capturedDescriptors,descriptors;
    cv::Mat_<float> capturedKeyPoints,keypoints; 
    QPushButton * pb_capture;
    
    QWidget * win;
    QVBoxLayout * layout;

    QCVModuleHandlerInterface * parent;
};

#endif
